<?php

namespace App\Http\Requests\Admin\AccountBooks;

use App\Http\Requests\Request;

class AccountBooksRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 验证规则
     *
     * @return array
     */
    public function rules()
    {
        return [
            'dcrTimes' => 'required|numeric|digits_between:1,4',
            'date' => 'required'
        ];
    }

    /**
     * 验证信息
     * @return array
     */

    public function messages()
    {
        return [
            'dcrTimes.required' => '请填写比对次数',
            'dcrTimes.numeric' => '比对次数需为数字',
            'dcrTimes.digits_between' => '比对次数的值为1-9999',
            'date.required' => '请填写比对日期',

        ];
    }
}
